On the Representation of Data in Lambda-Calculus
نویسنده
چکیده
We analyse the algorithmic properties of programs induced by the choice of the representation of data in lambda-calculus. From a logical point of view there are two canonical ways of defining the data types: the iterative one and the recursive one. Both define the same mathematical object, but we show that they have a completely different algorithmic content. The essential of the difference appears in the operational properties of two programs: the predecessor and the addition on the type of unary natural numbers (for the type of lists this would be the programs cdr and append). The results we prove in this paper state a fundamental duality between the iterative and recursive representation of data in lambda---calculus. For the iterative representation of natural numbers (Church numerals) there is a "one-step" addition, but we prove in §3 that there is no "one-step" predecessor (by "one--step" we mean "whose computation requires only number of reduction steps bounded by a constant"). For the recursive representation of natural numbers we have the converse situation: there is a "one-step" predecessor but we prove in §4 that there is no "one--step" addition. For simplicity, we state these results for the type of natural numbers, but they hold in fact for all the usual data types defined as multisorted term algebras. Their practical significance for programming, may be, appears clearer on the type of lists where the predecessor is replaced by the cdr and the addition by append. In §5, we briefly present a new representation of natural numbers for which we have both, a "one-step" predecessor and a "one-step" addition.
منابع مشابه
Additional Material for “Unifying Data Representation Transformations”
This report shows an end-to-end formalization of the data representation transformation mechanism in the “Unifying Data Representation Transformations” paper [16]. Since the mechanism described in the paper is targeted at the Scala programming language and the specification is written against System F<: with local colored type inference [11, 14] formally reasoning about the calculus is a major ...
متن کاملGödelization in the Untyped lambda-Calculus
It is well-known that one cannot inside the pure untyped lambda calculus determine equivalence. I.e., one cannot determine if two terms are beta-equivalent, even if they both have normal forms. This implies that it is impossible in the pure untyped lambda calculus to do Godelisation, i.e. to write a function that can convert a term to a representation of (the normal form of) that term, as equi...
متن کاملInhabitation in Simply-Typed Lambda-Calculus through a Lambda-Calculus for Proof Search
A new, comprehensive approach to inhabitation problems in simply-typed lambda-calculus is shown, dealing with both decision and counting problems. This approach works by exploiting a representation of the search space generated by a given inhabitation problem, which is in terms of a lambda-calculus for proof search that the authors developed recently. The representation may be seen as extending...
متن کاملThe Use of the Typed Lambda Calculus for Guiding Naive Users in the Representation and Acquisition of Part-Whole Knowledge
We address the task of enabling naive users in a practical context to define, comprehend and use knowledge bases for representing part-whole information. This work is part of a larger effort whose target users were ecologists who had little experience in mathematics, computing, and artificial intelligence, but who wished to build computer simulation models of ecological systems. The ecological ...
متن کاملExtending the Qualitative Trajectory Calculus Based on the Concept of Accessibility of Moving Objects in the Paths
Qualitative spatial representation and reasoning are among the important capabilities in intelligent geospatial information system development. Although a large contribution to the study of moving objects has been attributed to the quantitative use and analysis of data, such calculations are ineffective when there is little inaccurate data on position and geometry or when explicitly explaining ...
متن کاملStrong Normalization of Second Order Symmetric lambda-Calculus
Parigot suggested symmetric structural reduction rules for application to μ-abstraction in [9] to ensure unique representation of data type. We prove strong normalization of second order λμ-calculus with these rules.
متن کامل